package com.wxyzz.cem.exception;

import com.wxyzz.cem.enums.ResultType;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author xclhove
 */
@Data
@AllArgsConstructor
public abstract class ServiceException extends RuntimeException {
    private int code;
    private String message;
    private Object data;
    
    public ServiceException(String message) {
        this(message, null);
    }
    
    public ServiceException(String message, Object data) {
        this(ResultType.SERVICE_EXCEPTION.getCode(), message, data);
    }
}
